package pattern.creational.prototype.simple;

import java.util.*;
/**
 * @author: chaoyang.ren
 * @date:Jul 13, 2017
 * @time:4:29:03 PM
 * @email:chaoyang.ren@foxmail.com
 * @version: 1.0
 */
public class Prototype2 implements Cloneable {
	private ArrayList<Object> list = new ArrayList<Object>();

	@SuppressWarnings("unchecked")
	public Prototype2 clone() {
		Prototype2 prototype = null;
		try {
			prototype = (Prototype2) super.clone();
			prototype.list = (ArrayList<Object>) this.list.clone();
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
		return prototype;
	}
}
